Optimal. Leaf size=81 \[ -\frac {b c d^2}{6 x^2}-\frac {b c^2 d^2}{x}-\frac {d^2 (1+c x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 x^3}+\frac {4}{3} b c^3 d^2 \log (x)-\frac {4}{3} b c^3 d^2 \log (1-c x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {37, 6083, 12,
90} \begin {gather*} -\frac {d^2 (c x+1)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 x^3}+\frac {4}{3} b c^3 d^2 \log (x)-\frac {4}{3} b c^3 d^2 \log (1-c x)-\frac {b c^2 d^2}{x}-\frac {b c d^2}{6 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 37
Rule 90
Rule 6083
Rubi steps
\begin {align*} \int \frac {(d+c d x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{x^4} \, dx &=-\frac {d^2 (1+c x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 x^3}-(b c) \int \frac {(d+c d x)^2}{3 x^3 (-1+c x)} \, dx\\ &=-\frac {d^2 (1+c x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 x^3}-\frac {1}{3} (b c) \int \frac {(d+c d x)^2}{x^3 (-1+c x)} \, dx\\ &=-\frac {d^2 (1+c x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 x^3}-\frac {1}{3} (b c) \int \left (-\frac {d^2}{x^3}-\frac {3 c d^2}{x^2}-\frac {4 c^2 d^2}{x}+\frac {4 c^3 d^2}{-1+c x}\right ) \, dx\\ &=-\frac {b c d^2}{6 x^2}-\frac {b c^2 d^2}{x}-\frac {d^2 (1+c x)^3 \left (a+b \tanh ^{-1}(c x)\right )}{3 x^3}+\frac {4}{3} b c^3 d^2 \log (x)-\frac {4}{3} b c^3 d^2 \log (1-c x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 103, normalized size = 1.27 \begin {gather*} -\frac {d^2 \left (2 a+6 a c x+b c x+6 a c^2 x^2+6 b c^2 x^2+2 b \left (1+3 c x+3 c^2 x^2\right ) \tanh ^{-1}(c x)-8 b c^3 x^3 \log (x)+7 b c^3 x^3 \log (1-c x)+b c^3 x^3 \log (1+c x)\right )}{6 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.17, size = 142, normalized size = 1.75
method | result | size |
derivativedivides | \(c^{3} \left (d^{2} a \left (-\frac {1}{c^{2} x^{2}}-\frac {1}{3 c^{3} x^{3}}-\frac {1}{c x}\right )-\frac {d^{2} b \arctanh \left (c x \right )}{c^{2} x^{2}}-\frac {d^{2} b \arctanh \left (c x \right )}{3 c^{3} x^{3}}-\frac {d^{2} b \arctanh \left (c x \right )}{c x}-\frac {d^{2} b}{6 c^{2} x^{2}}-\frac {d^{2} b}{c x}+\frac {4 d^{2} b \ln \left (c x \right )}{3}-\frac {d^{2} b \ln \left (c x +1\right )}{6}-\frac {7 d^{2} b \ln \left (c x -1\right )}{6}\right )\) | \(142\) |
default | \(c^{3} \left (d^{2} a \left (-\frac {1}{c^{2} x^{2}}-\frac {1}{3 c^{3} x^{3}}-\frac {1}{c x}\right )-\frac {d^{2} b \arctanh \left (c x \right )}{c^{2} x^{2}}-\frac {d^{2} b \arctanh \left (c x \right )}{3 c^{3} x^{3}}-\frac {d^{2} b \arctanh \left (c x \right )}{c x}-\frac {d^{2} b}{6 c^{2} x^{2}}-\frac {d^{2} b}{c x}+\frac {4 d^{2} b \ln \left (c x \right )}{3}-\frac {d^{2} b \ln \left (c x +1\right )}{6}-\frac {7 d^{2} b \ln \left (c x -1\right )}{6}\right )\) | \(142\) |
risch | \(-\frac {d^{2} b \left (3 c^{2} x^{2}+3 c x +1\right ) \ln \left (c x +1\right )}{6 x^{3}}-\frac {d^{2} \left (7 x^{3} b \ln \left (-c x +1\right ) c^{3}-8 b \,c^{3} \ln \left (-x \right ) x^{3}+b \,c^{3} \ln \left (c x +1\right ) x^{3}-3 b \,x^{2} \ln \left (-c x +1\right ) c^{2}+6 a \,c^{2} x^{2}+6 b \,c^{2} x^{2}-3 b c x \ln \left (-c x +1\right )+6 c x a +b c x -b \ln \left (-c x +1\right )+2 a \right )}{6 x^{3}}\) | \(151\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 157 vs.
\(2 (73) = 146\).
time = 0.26, size = 157, normalized size = 1.94 \begin {gather*} -\frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} - 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \operatorname {artanh}\left (c x\right )}{x}\right )} b c^{2} d^{2} + \frac {1}{2} \, {\left ({\left (c \log \left (c x + 1\right ) - c \log \left (c x - 1\right ) - \frac {2}{x}\right )} c - \frac {2 \, \operatorname {artanh}\left (c x\right )}{x^{2}}\right )} b c d^{2} - \frac {1}{6} \, {\left ({\left (c^{2} \log \left (c^{2} x^{2} - 1\right ) - c^{2} \log \left (x^{2}\right ) + \frac {1}{x^{2}}\right )} c + \frac {2 \, \operatorname {artanh}\left (c x\right )}{x^{3}}\right )} b d^{2} - \frac {a c^{2} d^{2}}{x} - \frac {a c d^{2}}{x^{2}} - \frac {a d^{2}}{3 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 128, normalized size = 1.58 \begin {gather*} -\frac {b c^{3} d^{2} x^{3} \log \left (c x + 1\right ) + 7 \, b c^{3} d^{2} x^{3} \log \left (c x - 1\right ) - 8 \, b c^{3} d^{2} x^{3} \log \left (x\right ) + 6 \, {\left (a + b\right )} c^{2} d^{2} x^{2} + {\left (6 \, a + b\right )} c d^{2} x + 2 \, a d^{2} + {\left (3 \, b c^{2} d^{2} x^{2} + 3 \, b c d^{2} x + b d^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{6 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 158 vs.
\(2 (78) = 156\).
time = 0.54, size = 158, normalized size = 1.95 \begin {gather*} \begin {cases} - \frac {a c^{2} d^{2}}{x} - \frac {a c d^{2}}{x^{2}} - \frac {a d^{2}}{3 x^{3}} + \frac {4 b c^{3} d^{2} \log {\left (x \right )}}{3} - \frac {4 b c^{3} d^{2} \log {\left (x - \frac {1}{c} \right )}}{3} - \frac {b c^{3} d^{2} \operatorname {atanh}{\left (c x \right )}}{3} - \frac {b c^{2} d^{2} \operatorname {atanh}{\left (c x \right )}}{x} - \frac {b c^{2} d^{2}}{x} - \frac {b c d^{2} \operatorname {atanh}{\left (c x \right )}}{x^{2}} - \frac {b c d^{2}}{6 x^{2}} - \frac {b d^{2} \operatorname {atanh}{\left (c x \right )}}{3 x^{3}} & \text {for}\: c \neq 0 \\- \frac {a d^{2}}{3 x^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 330 vs.
\(2 (73) = 146\).
time = 0.43, size = 330, normalized size = 4.07 \begin {gather*} \frac {2}{3} \, {\left (2 \, b c^{2} d^{2} \log \left (-\frac {c x + 1}{c x - 1} - 1\right ) - 2 \, b c^{2} d^{2} \log \left (-\frac {c x + 1}{c x - 1}\right ) + \frac {2 \, {\left (\frac {3 \, {\left (c x + 1\right )}^{2} b c^{2} d^{2}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} b c^{2} d^{2}}{c x - 1} + b c^{2} d^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{3}}{{\left (c x - 1\right )}^{3}} + \frac {3 \, {\left (c x + 1\right )}^{2}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )}}{c x - 1} + 1} + \frac {\frac {12 \, {\left (c x + 1\right )}^{2} a c^{2} d^{2}}{{\left (c x - 1\right )}^{2}} + \frac {12 \, {\left (c x + 1\right )} a c^{2} d^{2}}{c x - 1} + 4 \, a c^{2} d^{2} + \frac {4 \, {\left (c x + 1\right )}^{2} b c^{2} d^{2}}{{\left (c x - 1\right )}^{2}} + \frac {7 \, {\left (c x + 1\right )} b c^{2} d^{2}}{c x - 1} + 3 \, b c^{2} d^{2}}{\frac {{\left (c x + 1\right )}^{3}}{{\left (c x - 1\right )}^{3}} + \frac {3 \, {\left (c x + 1\right )}^{2}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )}}{c x - 1} + 1}\right )} c \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.90, size = 116, normalized size = 1.43 \begin {gather*} \frac {d^2\,\left (6\,b\,c^3\,\mathrm {atanh}\left (c\,x\right )-4\,b\,c^3\,\ln \left (c^2\,x^2-1\right )+8\,b\,c^3\,\ln \left (x\right )\right )}{6}-\frac {\frac {d^2\,\left (2\,a+2\,b\,\mathrm {atanh}\left (c\,x\right )\right )}{6}+\frac {d^2\,x\,\left (6\,a\,c+b\,c+6\,b\,c\,\mathrm {atanh}\left (c\,x\right )\right )}{6}+\frac {d^2\,x^2\,\left (6\,a\,c^2+6\,b\,c^2+6\,b\,c^2\,\mathrm {atanh}\left (c\,x\right )\right )}{6}}{x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________